
#!/bin/sh 
set -e 

CONFIG_FILE="/app/jsherp/boot/config/application.properties"
 
if [ "$mysqlip" != "localhost" ] ; then 
	sed -i "s/localhost/$mysqlip/g" "$CONFIG_FILE"
fi 
if [ "$mysqlname" != "jsh_erp" ] ; then 
	sed -i "s/jsh_erp/$mysqlname/g" "$CONFIG_FILE"
fi 
if [ "$mysqlusername" != "jsherp" ] ; then 
	sed -i "s/jsherp/$mysqlusername/g" "$CONFIG_FILE"
fi 
if [ "$mysqlpassword" != "123456" ] ; then 
	sed -i "s/123456/$mysqlpassword/g" "$CONFIG_FILE"
fi 
if [ "$redisip" != "127.0.0.1" ] ; then 
	sed -i "s/127.0.0.1/$redisip/g" "$CONFIG_FILE"
fi 
if [ "$redisport" != "6379" ] ; then 
	sed -i "s/6379/$redisport/g" "$CONFIG_FILE"
fi 
if [ "$redispassword" != "1234abcd" ] ; then 
	sed -i "s/1234abcd/$redispassword/g" "$CONFIG_FILE"
fi 

   

/app/jsherp/boot/bin/run-manage.sh start
/usr/sbin/nginx
redis-server /etc/redis.conf



#/usr/sbin/nginx -g "daemon off;"


















